<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<p>Lorem ipsum dolor sit amet, consectetur.</p>
<p>Aliquid aut excepturi nemo sunt voluptas?</p>
<p>Doloremque id necessitatibus obcaecati sint soluta.</p>
<p>Eligendi error et modi quisquam temporibus.</p>
<p>Dicta laudantium ratione rerum voluptatibus! Nisi?</p>
姓名：<input type="text" name="username" id="uname">
<script>
    //ps 代表当前文档的第二个p标签
    let ps = document.getElementsByTagName('p')[1]
    ps.innerHTML = '<strong>hello</strong>'
    let p3 = document.getElementsByTagName('p')[2]
    p3.innerText = '<strong>文档段落标签</strong>'
    let p4 = document.getElementsByTagName('p')[3]

    //'javascript'.fontcolor('green') 其实是字符串 <font color="green">javascript</font>
    p4.innerText = 'javascript'.fontcolor('red').bold()

    let un = document.getElementById('uname')
    un.value = '客户姓名'
    un.title = 'aaaaaaaaa'

    document.title = Math.PI

    setInterval(() => {
        let d = new Date()
        document.querySelector('p').innerText = `现在时间：${d.getHours()}:${d.getMinutes()}:${d.getSeconds()}`
        //document.write(p1.innerText)
    }, 1000)

</script>
</body>
</html>
